package model

import "mini-admin/internal/model/vo"

// BytedanceTemplate 字节跳动模版
type BytedanceTemplate struct {
	BaseModel
	TemplateID  int    `gorm:"comment:模版ID;uniqueIndex:bytedance_template_id"`
	UserVersion string `gorm:"comment:版本号"`
	UserDesc    string `gorm:"comment:版本描述"`
}

// ToVO 转换提交对象
func (t BytedanceTemplate) ToVO(extJSON string) vo.BytedanceTemplate {
	return vo.BytedanceTemplate{
		TemplateID:  t.TemplateID,
		UserVersion: t.UserVersion,
		UserDesc:    t.UserDesc,
		ExtJSON:     extJSON,
	}
}
